<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>书城 - 登录</title>
    <script src="/js/jquery-3.3.1.js"></script>
    <script src="/js/index.js"></script>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
    <link rel="stylesheet" href="/css/index.css">
</head>
<body>
<form id="div1" th:action="@{http://localhost:8080/login}" method="post">
    <h2 > 欢 迎 登 录 </h2>
    <p th:text="${msg} ==null?'  ':${msg}"></p>
    <input type="text" placeholder="账号"  class="form-control" name="username" id="username"  th:value="${username} ==null?'':${username}">
    <input type="password" placeholder="密码"  class="form-control" name="password" id="password">
    <input type="submit" value="登录" class="btn btn-primary" onclick="login()">
</form>
</body>
</html>